import { request } from '@/service/request';

/** 获取祝福语配置列表 */
export function fetchGetBlessingConfigList (params?: Api.Relax.BlessingConfigSearchParams) {
    return request<Api.Relax.BlessingConfigList>({
        url: '/relax/blessingConfig/list',
        method: 'get',
        params
    });
}

/** 新增祝福语配置 */
export function fetchCreateBlessingConfig (data: Api.Relax.BlessingConfigOperateParams) {
    return request<boolean>({
        url: '/relax/blessingConfig',
        method: 'post',
        data
    });
}

/** 修改祝福语配置 */
export function fetchUpdateBlessingConfig (data: Api.Relax.BlessingConfigOperateParams) {
    return request<boolean>({
        url: '/relax/blessingConfig',
        method: 'put',
        data
    });
}

/** 批量删除祝福语配置 */
export function fetchBatchDeleteBlessingConfig (blessingIds: CommonType.IdType[]) {
    return request<boolean>({
        url: `/relax/blessingConfig/${blessingIds.join(',')}`,
        method: 'delete'
    });
}
